<template>
	<div>
    <div id="check">
      <div class="check-container">
        <!-- <div v-if="isCurrentVersion" class="watermark"><img class="watermark-img" src="@/assets/img/watermark.jpg" /></div> -->
        <div class="watermark"><img class="watermark-img" src="@/assets/img/watermark.jpg" /></div>
        <div class="content">
          <div style="height: 60px"></div>
          <div class="check-box">
            <div class="page-header1">
              <table border="1">
                <tr>
                	<td class="w-357 h-102">
                    <el-row>
                      <el-col :span="11" :offset="1">
                        <img src="@/assets/img/logoNew.png" style="height: 60px" />
                      </el-col>
                      <el-col :span="12">
                        <b style="font-size: 30px;line-height: 2;">成都倍特</b>
                      </el-col>
                    </el-row>
                  </td>
                  <td colspan="2" class="w-543 h-102 text-center" style="font-size: 21px">未上市产品物料放行审核单</td>
                </tr>
                <tr style="font-size: 19px;">
                	<td class="w-357 h-25"><div class="m-l-10">记录编号<span style="font-family: arial;padding-left: 1px">No.：ZL／SMP·064-R01</span></div></td>
                  <td class="w-237 h-25"><div class="m-l-10">版本号<span style="font-family: arial;padding-left: 1px">Version ：00</span></div></td>
                  <td class="w-306 h-25"><div class="m-l-10">页码<span style="font-family: arial;padding-left: 1px">Page ：1 / 1</span></div></td>
                </tr>
              </table>
              <div class="name-box">
                <div class="report-name">
                  <b>
                    未上市产品物料放行审核单
                  </b>
                </div>
              </div>
            </div>
            <div class="page-main" id="main-body">
              <table border="1">
                <tr>
                	<td class="w-100 h-42"><div class="text-center">物料名称</div></td>
                  <td colspan="3" class="h-42"><div class="text-center">{{ checkList.productName }}</div></td>
                  <td class="w-100 h-42"><div class="text-center">进厂批号</div></td>
                  <td class="w-240 h-42"><div class="text-center">{{ checkList.batchNum }}</div></td>
                </tr>
                <tr>
                	<td class="w-100 h-42"><div class="text-center">物料编码</div></td>
                  <td class="w-200 h-42"><div class="text-center">{{ checkList.productGmp }}</div></td>
                  <td class="w-100 h-42"><div class="text-center">放行数量</div></td>
                  <td class="w-160 h-42"><div class="text-center">{{ yfbList.grossQuantity + yfbList.grossUnitName }}</div></td>
                  <td class="w-100 h-42"><div class="text-center">包装规格</div></td>
                  <td class="w-240 h-42"><div class="text-center">{{ checkList.productPackSpec }}</div></td>
                </tr>
              </table>
              <table border="1" style="border-top: none">
                <tr>
                	<td class="w-100 h-42" rowspan="2"><div class="text-center">生产日期</div></td>
                  <td class="w-300 h-42" rowspan="2"><div class="text-center">{{ yfbList.productionDate | showTime(yfbList.productionDateUnit) }}</div></td>
                  <td class="w-210 h-42">
                    <div class="text-center">有效期至 <div class="select-box"><img v-if="yfbList.validityDate != null && yfbList.validityDate != ''" style="display: block" src="@/assets/img/benefits.png" /></div></div>
                  </td>
                  <td class="w-290 h-42" rowspan="2"><div class="text-center">{{ (yfbList.validityDate != null && yfbList.validityDate != '' ? yfbList.validityDate : yfbList.reinspectDate) | showTime(yfbList.selectDateUnit) }}</div></td>
                </tr>
                <tr>
                  <td class="w-210 h-42">
                    <div class="text-center">复验期 <div class="select-box"><img v-if="yfbList.reinspectDate != null && yfbList.reinspectDate != ''" style="display: block" src="@/assets/img/benefits.png" /></div></div>
                  </td>
                </tr>
              </table>
              <table border="1" style="border-top: none">
                <tr>
                	<td class="w-100 h-42"><div class="text-center">审核项目</div></td>
                  <td class="h-42" colspan="6"><div class="text-center">审核项目与标准</div></td>
                  <td class="w-170 h-42"><div class="text-center">审核结果</div></td>
                </tr>
                <tr>
                	<td class="w-100 h-42" rowspan="2"><div class="text-center">厂商资料</div></td>
                  <td class="h-42" colspan="6"><div class="m-l-5">是否完成供应商资质审核。</div></td>
                  <td class="w-170 h-42">
                    <div class="select-box m-l-5"></div>是,
                    <div class="select-box"></div>否&nbsp;&nbsp;
                    <div class="select-box" style="margin-left: 5px;"></div>暂不涉及
                  </td>
                </tr>
                <tr>
                  <td class="h-42" colspan="6"><div class="m-l-5">有供货方检验报告单原件或加盖鲜章的复印件，报告单内容完整，结果合格且符合我公司内控标准要求，数据无异常。</div></td>
                  <td class="w-170 h-42">
                    <div class="select-box m-l-5"></div>符合,
                    <div class="select-box"></div>不符合
                  </td>
                </tr>
                <tr>
                	<td class="w-100 h-42" rowspan="6"><div class="text-center">物料检验</div></td>
                  <td class="h-42" colspan="6"><div class="m-l-5">请验单填写内容正确、清晰，与厂商、批号、规格、数量等信息一致。</div></td>
                  <td class="w-170 h-42">
                    <div class="select-box m-l-5"></div>符合,
                    <div class="select-box"></div>不符合
                  </td>
                </tr>
                <tr>
                  <td class="h-42" colspan="6"><div class="m-l-5">取样记录填写正确，记录信息与请验单一致。</div></td>
                  <td class="w-170 h-42">
                    <div class="select-box m-l-5"></div>符合,
                    <div class="select-box"></div>不符合
                  </td>
                </tr>
                <tr>
                  <td class="h-42" colspan="6"><div class="m-l-5">QC部门/研发部门QC出具的检验报告合格，符合本企业内控标准要求。</div></td>
                  <td class="w-170 h-42">
                    <div class="select-box m-l-5"></div>符合,
                    <div class="select-box"></div>不符合
                  </td>
                </tr>
                <tr>
                  <td class="h-42" colspan="6"><div class="m-l-5">检验项目齐全；检验记录的各项分析结果达到质量标准要求，有操作人、复核人及主管签名及日期。</div></td>
                  <td class="w-170 h-42">
                    <div class="select-box m-l-5"></div>符合,
                    <div class="select-box"></div>不符合
                  </td>
                </tr>
                <tr>
                  <td class="h-42" colspan="6">
                    <div class="m-l-5">
                     未完成检验项目是否对产品质量产生影响；是否属于低风险。
                    </div>
                  </td>
                  <td class="w-170 h-42">
                    <div class="select-box m-l-5"></div>符合,
                    <div class="select-box"></div>不符合
                  </td>
                </tr>
                <tr>
                  <td class="h-42" colspan="6"><div class="m-l-5">检验原始图谱齐备，有检验人签名。</div></td>
                  <td class="w-170 h-42">
                    <div class="select-box m-l-5"></div>符合,
                    <div class="select-box"></div>不符合
                  </td>
                </tr>
                <tr>
                	<td class="w-100 h-42" rowspan="3"><div class="text-center">物料贮存</div></td>
                  <td class="h-42" colspan="6"><div class="m-l-5">物料包装完好，分库、分区存放。</div></td>
                  <td class="w-170 h-42">
                    <div class="select-box m-l-5"></div>符合,
                    <div class="select-box"></div>不符合
                  </td>
                </tr>
                <tr>
                  <td class="h-42" colspan="6"><div class="m-l-5">物料贮存条件符合其贮存要求。</div></td>
                  <td class="w-170 h-42">
                    <div class="select-box m-l-5"></div>符合,
                    <div class="select-box"></div>不符合
                  </td>
                </tr>
                <tr>
                  <td class="h-42" colspan="6"><div class="m-l-5">物料标示正确；账、卡、物相符。</div></td>
                  <td class="w-170 h-42">
                    <div class="select-box m-l-5"></div>符合,
                    <div class="select-box"></div>不符合
                  </td>
                </tr>
                <tr>
                	<td class="w-100 h-42"><div class="text-center">偏&nbsp;&nbsp;差</div></td>
                  <td class="h-42" colspan="6">
                    <div class="m-l-5">
                      无<div class="select-box"></div>；
                      有<div class="select-box"></div>，偏差已调查处理，偏差编号：
                    </div>
                  </td>
                  <td class="w-170 h-42">
                    <div class="select-box m-l-5"></div>符合,
                    <div class="select-box"></div>不符合
                  </td>
                </tr>
                <tr>
                	<td class="w-100 h-42"><div class="text-center">变&nbsp;&nbsp;更</div></td>
                  <td class="h-42" colspan="6">
                    <div class="m-l-5">
                      无<div class="select-box"></div>；
                      有<div class="select-box"></div>，变更已按程序审批，变更编号：
                    </div>
                  </td>
                  <td class="w-170 h-42">
                    <div class="select-box m-l-5"></div>符合,
                    <div class="select-box"></div>不符合
                  </td>
                </tr>
                <tr style="font-size: 24px;">
                	<td class="w-100 h-70"><div class="text-center"><b>结 &nbsp;论</b></div></td>
                  <td class="h-70" colspan="7">
                    <div class="m-l-80">
                      <div class="select-box-b"></div><b>准予放行；</b> &nbsp;&nbsp;
                      <div class="select-box-b"></div><b>不准予放行</b>
                    </div>
                  </td>
                </tr>
                <tr>
                	<td class="w-100 h-42"><div class="text-center">QA审核人</div></td>
                  <td class="w-120 h-42"></td>
                  <td class="w-70 h-42"><div class="text-center">日期</div></td>
                  <td class="w-160 h-42"><div class="p-l-50">年&nbsp;月&nbsp;日</div></td>
                  <td class="w-100 h-42"><div class="text-center">批准人</div></td>
                  <td class="w-120 h-42"></td>
                  <td class="w-70 h-42"><div class="text-center">日期</div></td>
                  <td class="w-160 h-42"><div class="p-l-50">年&nbsp;月&nbsp;日</div></td>
                </tr>
                <tr>
                	<td class="w-100 h-70"><div class="text-center">物料处置情况描述</div></td>
                  <td class="h-70" colspan="7"></td>
                </tr>
                <tr>
                	<td class="w-100 h-70"><div class="text-center">建&nbsp;&nbsp;议</div></td>
                  <td class="h-70" colspan="7"></td>
                </tr>
              </table>
              <div style="position: absolute;bottom: 80px;">
                <div style="padding-left: 670px">
                  <span style="font-family: arial">2021.03.18</span> 生效
                </div>
              </div>
              <div class="page-foot text-center">
                <div class="copyright-box">
                  <div style="font-family: arial">
                    This document is strictly confidential.Any use and copy unauthorized by CHENGDU BRILLIANT PHARMACEUTICAL <b><i>is forbidden.</i></b>
                  </div>
                  <div>
                    本文件仅限成都倍特药业股份有限公司内部使用，严禁任何无授权使用、泄露或复印，违者必究。
                  </div>
                </div>
              </div>
              <!-- <div style="width: 100%;height: 290px;border: 1px solid"></div> -->
            </div>
          </div>
        </div>
      </div>
    </div>
	</div>
</template>

<script>
  import {
    getCheckInfo,
    getCurrentVersion
  } from '@/api/check'
  import { CODE_OK } from '@/common/js/config'
  import { isBlank,parseTime } from '@/common/js/utils'
	export default {
    data() {
      return {
        isCurrentVersion: false,
        visible: false,
        checkList: {},
        yfbList: {}
      }
    },
    props: ["childDataForm"],
    created() {
      if (!isBlank(this.childDataForm)) {
        this.checkList = this.childDataForm
        this.getData()
        this.visible = true
      }
    },
    methods: {
      getData() {
        const params = {
          content: 'yfb',
          checkId: this.checkList.checkId
        }
        getCheckInfo(params).then(res => {
          if (res.code === CODE_OK) {
          	this.yfbList = res.info.yfbList
          }else{
          	this.$message.error(res.msg)
          }
        })
        const params2 = {
          checkTypeId: this.checkList.checkTypeId,
          printClassify: '物料放行审核单'
        }
        getCurrentVersion(params2).then(res => {
          if (res.code === CODE_OK) {
            this.isCurrentVersion = ((res.version.recordNum + '-' + res.version.versionNum) == this.checkList.printPassNumber)
          }else{
          	this.$message.error(res.msg)
          }
        })
      },
      close() {
        this.visible = false
        this.$emit('close')
      }
    }
	}
</script>

<style type="text/scss" lang="scss" scoped>
  .check-container{
    color: black;
    background-color: #fff;
    font-family: SimSun;
    font-size: 19px;
    letter-spacing: 0.1px;
    width: 960px;
    height: 1480px;
    padding: 15px;
    .watermark{
      position: absolute;
      margin-top: 250px;
      .watermark-img{
        width: 960px;
      }
    }
    .content{
      position: relative;
      .check-box{
        width: 900px;
        height: 1375px;
        margin: 0 15px;
        .page-header1{
          height: 190px;
          .name-box{
            height: 100px;
            .report-name{
              text-align: center;
              letter-spacing: 0;
              font-size: 25px;
              line-height: 100px;
            }
          }
        }
        .page-main{
          margin-top: 20px;
          .first-col{
            border-top:0;
            border-right:0;
            border-bottom:0;
            border-left:0;
          }
          .one-col{
            border-top:0;
            border-right:0;
            border-bottom:0;
            border-left:1px solid black;
          }
        }
        .page-foot{
          border-top: 2px solid black;
          font-size: 13px;
          width: 900px;
          bottom: 25px;
          position: absolute;
          height: 40px;
          .copyright-box{
            width: 100%;
            bottom: 0;
            position: absolute;
          }
        }
      }
    }
    .select-box{
      display: inline-block;
      width: 15px;
      height: 15px;
      border: 1px solid black;
    }
    .select-box-b{
      display: inline-block;
      width: 16px;
      height: 16px;
      border: 2px solid black;
    }
    .no-line{
      top: 7px;
      position: relative;
      display: inline-block;
      width: 230px;
      border-bottom: 1px solid rgb(0, 0, 0);
    }
    .w-70{
      width: 70px;
    }
    .w-100{
      width: 100px;
    }
    .w-120{
      width: 120px;
    }
    .w-160{
      width: 160px;
    }
    .w-200{
      width: 200px;
    }
    .w-210{
      width: 210px;
    }
    .w-225{
      width: 225px;
    }
    .w-240{
      width: 240px;
    }
    .w-306{
      width: 306px;
    }
    .w-237{
      width: 237px;
    }
    .w-290{
      width: 290px;
    }
    .w-300{
      width: 300px;
    }
    .w-357{
      width: 357px;
    }
    .w-450{
      width: 450px;
    }
    .h-255{
      height: 255px;
    }
    .h-100{
      height: 100px;
    }
    .h-102{
      height: 102px;
    }
    .h-25{
      height: 25px;
    }
    .h-30{
      height: 30px;
    }
    .h-42{
      height: 42px;
    }
    .h-70{
      height: 70px;
    }
    .p-l-50{
      padding-left: 50px;
    }
    .m-l-5{
      margin-left: 5px;
    }
    .m-l-10{
      margin-left: 10px;
    }
    .m-l-80{
      margin-left: 80px;
    }
  }
</style>
